﻿using System.ComponentModel.DataAnnotations;

namespace Model.Entity.User
{
    /// <summary>
    /// 用户表
    /// </summary>
    public class TB_User : EntityBase
    {
        /// <summary>
        /// 用户名(16)
        /// </summary>
        [Required, MaxLength(16)]
        public string UserName { get; set; }
        /// <summary>
        /// 邮箱(32)
        /// </summary>
        [Required,MaxLength(32)]
        public string Email { get; set; }
        /// <summary>
        /// 密码盐(32)
        /// </summary>
        [Required, MaxLength(32)]
        public string PasswordSalt { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required,MaxLength(256)]
        public string Password { get; set; }
        /// <summary>
        /// 用户类型Id
        /// </summary>
        [Required]
        public int UserTypeId { get; set; }
        /// <summary>
        /// 状态类型Id
        /// </summary>
        [Required]
        public int StateTypeId { get; set; }
        /// <summary>
        /// 手机号(11)
        /// </summary>
        [MaxLength(11)]
        public string? PhoneNumber { get; set; }
        /// <summary>
        /// 个人说明(32)
        /// </summary>
        [MaxLength(32)]
        public string? Statement { get; set; }
        /// <summary>
        /// 学校名称(32)
        /// </summary>
        [MaxLength(32)]
        public string? SchoolName { get; set; }
        /// <summary>
        /// 头像路径
        /// </summary>
        public string? AvatarPath { get; set; }
        /// <summary>
        /// 背景路径
        /// </summary>
        public string? BackdropPath { get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime? Birthday { get; set; }
        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? LastLoginDate { get; set; }
        /// <summary>
        /// 性别类型Id
        /// </summary>
        public int? GenderTypeId { get; set; }
    }
}
